package com.lins.framework.ui.home.rxbus;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.lins.framework.R;
import com.lins.framework.mvpframe.rx.RxBus;

import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Admin on 2017/4/10.
 */

public class RxBusActivity extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_rxbus);
        ButterKnife.bind(this);
    }

    public void sent() {
        User user = new User("Lins", "123456");
        RxBus.$().post(1, user);
    }

    @OnClick(R.id.id_btn)
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.id_btn:
                sent();
                break;
        }
    }
}
